import {GROUP_LIST, GROUP_MEMBER, RELATION_CHAT_LIST} from "./requestUrl.js"
import {request} from './requst.js'
import store from '../store/index.js'

export function getGroupList() {
	return request({
		url: GROUP_LIST,
		method: 'post'
	})
}

// 根据群聊id查找群成员
export function getMember(lost_id) {
	return request({
		url: GROUP_MEMBER,
		method: 'post',
		data: {lost_id}
	})
}

export function getChatList() {
	return request({
		url: RELATION_CHAT_LIST,
		method: 'post',
		data: {user_id: store.state.userInfo.user_id}
	})
}